/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sociesc.indoorgps.dao;

import com.j256.ormlite.jdbc.JdbcConnectionSource;
import com.j256.ormlite.support.ConnectionSource;
import java.nio.file.Paths;
import java.sql.SQLException;


public class ConnectionFactory {
    private static ConnectionFactory instance;
    public static String databaseUrl = "jdbc:h2:file:" + Paths.get("").toAbsolutePath() + "/database.h2.db";
    
    public static ConnectionSource createConn() throws SQLException{
        System.out.println("Caminho: " + Paths.get("").toAbsolutePath());
        return new JdbcConnectionSource(databaseUrl);
    }

}
